package cn.edu.tju.elm.mapper;

import cn.edu.tju.elm.dto.OrderDetailetResponseDTO;
import cn.edu.tju.elm.model.OrderDetailet;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
* ClassName: OrderDetailetMapper
* Package: cn.edu.tju.elm.mapper
* Description: 
* @Author Niu Wenhang
* @Create 2025/9/19 0:05 
* @Version 1.0   
* 
* @Author Liu Wenrui
* @Create 2025/9/26 10:00
* @Version 1.1
*/
@Mapper(componentModel = "spring")
public interface OrderDetailetMapper {
    @Mapping(target = "foodId", source = "food.id")
    OrderDetailetResponseDTO toOrderDetailetResponseDTO(OrderDetailet orderDetailet);
    OrderDetailet toOrderDetailet(OrderDetailetResponseDTO orderDetailetResponseDTO);
}
